#include "MainMenu.h"
#include "../../model/vo/DataVO.h"
#include "../../constants/GameConstans.h"
#include "../../utils/LocalString.h"
#include "Framework.h"
#include "scene/DungeonsListScene.h"

MainMenu::MainMenu(void)
{
	init();
}


MainMenu::~MainMenu(void)
{
}

SEL_MenuHandler MainMenu::onResolveCCBCCMenuItemSelector(CCObject * pTarget, CCString * pSelectorName) {
	return NULL;    
}

SEL_CCControlHandler MainMenu::onResolveCCBCCControlSelector(CCObject * pTarget, CCString * pSelectorName) {
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onHomeClick", MainMenu::onHomeClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onEquipClick", MainMenu::onEquipClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onDungeonClick", MainMenu::onDungeonClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onShopClick", MainMenu::onShopClick);
	CCB_SELECTORRESOLVER_CCCONTROL_GLUE(this, "onMenuClick", MainMenu::onMenuClick);
	return NULL;
}

bool MainMenu::onAssignCCBMemberVariable(CCObject * pTarget, CCString * pMemberVariableName, CCNode * pNode) {
	//CCB_MEMBERVARIABLEASSIGNER_GLUE(this, "mCCControlEventLabel", CCLabelBMFont *, this->mCCControlEventLabel);

	return false;
}

void MainMenu::onHomeClick(CCObject * pSender, CCControlEvent pCCControlEvent) {
	Framework::getSingletonPtr()->changeState("HomeScene");
}

void MainMenu::onEquipClick(CCObject * pSender, CCControlEvent pCCControlEvent) {
	Framework::getSingletonPtr()->changeState("PacketScene");
}

void MainMenu::onDungeonClick(CCObject * pSender, CCControlEvent pCCControlEvent) {
	Framework::getSingletonPtr()->changeState("DungeonsScene");
}

void MainMenu::onShopClick(CCObject * pSender, CCControlEvent pCCControlEvent) {
	
}

void MainMenu::onMenuClick(CCObject * pSender, CCControlEvent pCCControlEvent) {
	
}

bool MainMenu::init()
{
	return true;
}

void MainMenu::menuCallback(CCObject* pSender)
{
}
